export default {
  type: 'line',
  lineStyle: {
    color: '#1166ee'
  },
  markPoint: {
    symbolSize: 1,
    symbolOffset: [0, '50%'],
    label: {
      formatter: function(params) {
        const {
          data: { k, b }
        } = params
        const _b = Number(b).toFixed(2)
        const _k = Number(k).toFixed(2)
        return `{a|y=${_k}x+${_b}}`
      },
      position: 'top',
      distance: 5,
      backgroundColor: 'rgba(17, 102, 238, .6)',
      borderColor: '#1166ee',
      borderRadius: 2,
      padding: [5, 5],
      rich: {
        a: {
          align: 'center',
          color: '#fff',
          fontSize: 16,
          textShadowBlur: 2,
          textShadowColor: '#000',
          textShadowOffsetX: 0,
          textShadowOffsetY: 1,
          textBorderColor: '#333',
          textBorderWidth: 2
        }
      }
    }
  }
}
